﻿<%@ Page Language="C#" MasterPageFile="~/Grocer.Master" AutoEventWireup="true" CodeBehind="ViewList.aspx.cs" Inherits="EasyGrocer.ViewList" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="head">
    </asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="MainContent">
    <br />
    <center>
         <asp:Label ID="Label1" runat="server" CssClass="mainTitle" Text="Shopping List"></asp:Label></center><br />
        <br /><br />
    <div>
        <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
            ContextTypeName="EasyGrocer.DataLayer.EasyGrocerDBDataContext" 
            Select="new (Name, Price)" TableName="Products">
        </asp:LinqDataSource>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AllowSorting="True" DataSourceID="LinqDataSource1">
            <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="Name" HeaderText="Name" ReadOnly="True" 
                    SortExpression="Name" />
                <asp:BoundField DataField="Price" HeaderText="Price" ReadOnly="True" 
                    SortExpression="Price" />
                <asp:CommandField ShowDeleteButton="True" />
            </Columns>
        </asp:GridView>
        <br />
    </div>
    <table style="width: 100%; padding-left:10px;">
        <tr>
            <td class="leftRecipePanel">
                <table style="width:100%;">
                                    
                    <tr>
                        <td class="displayItems1"><asp:Button ID="Button3" runat="server" CssClass="bigButton2" Height="42px" 
                      Text="Kellogg's Frosted Flakes" Width="269px" onclick="Button8_Click" /><br />
                            &nbsp; &nbsp;<b>Cost:</b> $3.99</td>
                        <td class="displayItems2">
                <asp:Button cssClass="smallButton" ID="Button7" runat="server" Text="View Map" 
                                onclick="Button7_Click1"  />
                            <asp:Button cssClass="smallButton" ID="Button15" runat="server"  
                                Text="Remove" onclick="Button15_Click" />
                        </td>
                    </tr>
                    <tr>
                    <td class="displayItems1"><b><u><asp:Button 
                            ID="Button24" runat="server" CssClass="bigButton2" Height="42px" 
                      Text="Dole Canned Mandarins" Width="269px" onclick="Button8_Click" /></u></b><br />
                        &nbsp;&nbsp; <b>Cost:</b> $1.99</td>
                        <td class="displayItems2">
                <asp:Button cssClass="smallButton" ID="Button8" runat="server" Text="View Map"  />
                            <asp:Button cssClass="smallButton" ID="Button16" runat="server"  
                                Text="Remove" />
                        </td>
                    </tr>
                    <tr>
                        <td class="displayItems1"><b><u><asp:Button ID="Button25" 
                                runat="server" CssClass="bigButton2" Height="42px" 
                      Text="PC Chocolate Chip Cokies" Width="269px" onclick="Button8_Click" /></u></b><br />
                            &nbsp; <b>Cost:</b> $3.49</td>
                        <td class="displayItems2">
                <asp:Button cssClass="smallButton" ID="Button9" runat="server" Text="View Map"  />
                            <asp:Button cssClass="smallButton" ID="Button17" runat="server"  
                                Text="Remove" />
                        </td>
                    </tr>
                    <tr>
                        <td class="displayItems1"><b><u>
                            <asp:Button ID="Button26" 
                                runat="server" CssClass="bigButton2" Height="42px" 
                      Text="Sandwich bread dough" Width="269px" onclick="Button8_Click" /></u></b><br />
                            &nbsp; <b>Preperation time:</b> 30 mins, <b>cost:</b> $13.95</td>
                        <td class="displayItems2">
                <asp:Button cssClass="smallButton" ID="Button11" runat="server" Text="View Map"  />
                            <asp:Button cssClass="smallButton" ID="Button18" runat="server"  
                                Text="Remove" onclick="Button18_Click" />
                                    </td>
                    </tr>
                    <tr>
                        <td><b>Total cost:</b> $23.42</td>
                        <td>
                <asp:Button cssClass="smallButton" ID="Button22" runat="server" 
                                Text="View All Items in Map" Width="170px" onclick="Button22_Click" />
                                    </td></tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td>
                            Page 1 of 1</td></tr>
                 </table>

                <br />
            </td>
            <td  style="vertical-align:top">
                <table>
                    <tr>
                    <td>
                        <table>
                            <tr>
                                <td class="Search">
                                <asp:Button CssClass="smallButton" ID="Button1" runat="server" Text="Clear List" onclick="Button1_Click" 
                                      />
                                <br />
                                <br />
                                    SMS the list to:<br />
                                <asp:TextBox ID="txtViewList1" runat="server" Width="200px"></asp:TextBox>
                                &nbsp;
                                <br />
                                <asp:Button cssClass="smallButton" ID="btnViewListSend" runat="server" Text="Send" onclick="Button2_Click"/>
                                <br />
                                <asp:Label ID="Label9" runat="server"></asp:Label>
                                <br />
                                </td>
                            </tr>

                        </table>                    
                    </td>
                    </tr>
                
                </table>            
            </td>
        </tr>

        <tr>
            <td>
                <br />
            </td>
            <td>
                &nbsp;</td>
        </tr>

    </table>
</asp:Content>